
#include "ProcessPool.hpp"
#include <string>

int main(int argc, char* argv[])
{
    if(argc !=2) 
    {
        std::cout<<argc<<std::endl;
        std::cout<<"命令行第二个参数应该指明进程池中进程数"<<std::endl;
        exit(1);
    }

    int num=std::stoi(argv[1]); 
    ProcessPool pool(num, Work);
    pool.Init();

    pool.DispatchTask(10);

    pool.CleanProcessPool();


    return 0;
}